import request from '@/utils/request'

// 根据 topicId 获取其下所有 comments
export function fetchCommentsByPostId(postId) {
	return request({
		url: '/api/comment/list',
		method: 'get',
		params: {
			postId: postId
		}
	})
}

// 发表新评论
export function createComment(comment) {
	return request({
		url: '/api/comment/create',
		method: 'post',
		data: comment
	})
}
